//
//  Config.h
//  HOLLASMSLoginKit
//
//  Created by Mars on 2019/10/10.
//  Copyright © 2019 mao PengLin. All rights reserved.
//

#import "XCLocalStringTool.h"

#ifndef Config_h
#define Config_h

#define RegularFont(_SIZE)               ([UIFont systemFontOfSize:_SIZE weight:UIFontWeightRegular])
#define MediumFont(_SIZE)                ([UIFont systemFontOfSize:_SIZE weight:UIFontWeightMedium])
#define DemiBoldFont(_SIZE)              ([UIFont systemFontOfSize:_SIZE weight:UIFontWeightSemibold])
#define BoldFont(_SIZE)                  ([UIFont systemFontOfSize:_SIZE weight:UIFontWeightBold])

// 是否是IPHONEX
#define IPHONE_X \
({BOOL isPhoneX = NO;\
if (@available(iOS 11.0, *)) {\
isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\
}\
(isPhoneX);})

#define HWNavBarHeight                   (IPHONE_X?88:64)
#define HWScreenWidth                    ([[UIScreen mainScreen] bounds].size.width)
#define HWScreenHeight                   ([[UIScreen mainScreen] bounds].size.height)

#define kXCSMSTermsServiceNotification @"kXCSMSTermsServiceNotification"        //服务协议通知
#define kXCSMSPrivacyPolicyNotification @"kXCSMSPrivacyPolicyNotification"      //隐私政策通知
#define kXCSMSCompleteNotification @"kXCSMSCompleteNotification"          //成功通知
#define kXCSMSErorrNotification @"kXCSMSErorrNotification"           //失败通知
#define kXCSMSEventSendCodeNotification @"kXCSMSEventSendCodeNotification"           //发送验证打点
#define kXCSMSEventVerifyCodeNotification @"kXCSMSEventVerifyCodeNotification"           //登录验证码打点

static inline NSString * HWLocalizedString(NSString *key){
    
    return [[XCLocalStringTool sharedInstance] getLocalStringWithKey:key];
}

static inline BOOL SMSIsArabic () {
    NSString *languageCode = [[NSLocale preferredLanguages] objectAtIndex:0];
    return [languageCode hasPrefix:@"ar"];
}

static inline BOOL SupportMultiLanguages () {
    return YES;
}

#endif /* Config_h */
